import React, { useEffect, useState } from 'react';
import './style.less';
export default function Index(props) {
  const [data, setData] = useState({});
  useEffect(() => {
    // get()
    setData(props.location.state);
  }, []);
  return (
    <div className="detail">
      <div className="detailTop">
        <button>查看日志</button>
      </div>
      <div className="detailMain">
        <div className="dmTitle">
          <h1>{data.title}</h1>
          <h6>发布时间：{data.time}</h6>
        </div>
        <div className="dmMain">
          {data.content}
          <div className="dep">
            <span>{data.deparment}</span>
            <br />
            <span>{data.releaseTime}</span>
          </div>
        </div>
        <div className="dmtable">
          <table border={1}>
            <tr align="left">
              <th>文件说明</th>
              <th>文件大小</th>
              <th>上传时间</th>
              <th>上传人员</th>
              <th></th>
              <th></th>
              <th></th>
            </tr>
            <tr>
              <td>相关说明.txt</td>
              <td>27B</td>
              <td>{data.releaseTime}</td>
              <td>张妍</td>
              <td className="tableLastThree">日志</td>
              <td className="tableLastThree">查看</td>
              <td className="tableLastThree">下载</td>
            </tr>
          </table>
        </div>
      </div>
    </div>
  );
}
